<!--<?php
print <<<EOT
-->

<script src="../css/edit.js"></script>

<!--Content Start-->
<table width="95%" border="0" align="center">
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>
      <table width="98%" border="0" align="left" cellpadding="3" cellspacing="3">
        <tr> 
          <td>
          
            <table border="0" cellspacing="1" cellpadding="1">
              <tr>
                <td align="center" valign="middle">
                  <form name="form1" method="post" action="p_product_add.php">
                  <table border="0" cellspacing="1" cellpadding="1">
                    <tr> 
                      <td><input type="text" class="text" name="code" size="20" value="Enter code ..." onFocus="form1.name.value=''"></td>
                      <td><input name="image" type="image"  onCLick="form1.submit" src="../images/admin/bt_add.gif"></td>
			          <td><img src="../images/admin/shim.gif" width=30></td>
                    </tr>
                  </table>
                  </form>
                </td>
                
                <td align="center" valign="middle">
                  <form name="select_form" method="GET" action="p_product.php">
                  <table border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <td>
                        <!-- inventory select start-->
                        <select class="select" name="iid">
<!--
EOT;
foreach ($inventory_select_ary as $k=>$v) {
    $inventory_selected_flag = $k == $iid ? "selected" : "";
    
print <<<EOT
-->

                          <option value="$k" $inventory_selected_flag>$v</option>
                          
<!--
EOT;
} print <<<EOT
--> 

                        </select>
                        
                        <!-- category select start-->
<select class="select" name="cid">
<option value="0">Select...</option>
$strProductCateOptions
</select>
                      </td>
                      <td><input name="key" type="text" size="10" class="text" value="$key" onFocus="select_form.key.value='';return false"></td>
			          <td><input name="subbutton" type="image" src="../images/admin/bt_search.gif" onclick="select_form.submit"></td>
			          <td><a href="p_product.php"><img src="../images/admin/bt_listall.gif" border="0" /></a></td>
                    </tr>
                  </table>
                  </form>
			    </td>
              </tr>
            </table>

            <span id="edit_area"></span>
            
            $page_show

            <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
              <tr class="tbheader"> 
		        <td width="7%">Code</td>
                <td width="18%">Name</td>
                <td width="12%">MCP($)</td>
                <td width="10%">DCP($)</td>
                <td width="10%">HK($)</td>
                <td width="5%">New</td>
                <td width="5%">Hidden in product</td>
			    <td width="15%"></td>
              </tr>

<!--
EOT;
for($i=0; $i<count($out_ary); $i++){
    $new_out = $out_ary[$i]['new_flag'] == 1 ? "YES" : "NO";
    $show_out = $out_ary[$i]['hidden_flag'] == 1 ? "YES" : "NO";
print <<<EOT
-->

              <tr class="tbcontent1"> 
		        <td>{$out_ary[$i]['code']}</td>
                <td>{$out_ary[$i]['name']}</td>
                <td>{$out_ary[$i]['price_1']}</td>
                <td>{$out_ary[$i]['price_2']}</td>
                <td>{$out_ary[$i]['price_3']}</td>
                <td>$new_out</td>
                <td>$show_out</td>
			    <td align=center bgcolor="ECECEC">
			    <a href="javascript:getAdminEdit('edit_area', '3', '{$out_ary[$i]['id']}')"><img src="../images/admin/bt_edit.gif" border="0" alt="Edit"></a>
			    <a href="p_product.php?action=del&pid={$out_ary[$i]['id']}" onclick="return confirm('Delete {$out_ary[$i]['name']}?')"><img src="../images/admin/bt_delete.gif" border="0" Alt="Delete"></a>
			    <!--<a href="enquire.php?id=7"><img src="../images/admin/bt_enquiry.gif" border="0" Alt="Enquire"></a>--></td>
              </tr>

<!--
EOT;
} print <<<EOT
--> 

                            
            </table>

            $page_show

          </td>
        </tr>
      </table>
      
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
  </tr>
</table>
<!--Content End-->

<!--
EOT;
?>-->